if ( getInternetExplorerVersion() == -1 ){
	(function() {
		tinymce.create('tinymce.plugins.shortcodes', {
			init : function(ed, url) {
				ed.addButton('shortcodes', {
					title : 'Architec Shortcodes',
					image : url + '/shortc.png',
					onclick : function() {
						//ed.selection.setContent('[shortcodes]' + ed.selection.getContent() + '[/shortcodes]');
						ed.windowManager.open({
							file : url + '/interface.php',
							width : 410,
							height : 250,
							inline : 1
						}, {
							plugin_url : url
						});
					}
				});
			},
			createControl : function(n, cm) {
				return null;
			},
		});
		tinymce.PluginManager.add('shortcodes', tinymce.plugins.shortcodes);
	})();
} else {
	(function() {
		tinymce.create('tinymce.plugins.shortcodes', {
			init : function(ed, url) {
				ed.addButton('shortcodes', {
					title : 'Architec Shortcodes',
					image : url + '/btn.png',
					onclick : function() {
						//ed.selection.setContent('[shortcodes]' + ed.selection.getContent() + '[/shortcodes]');
						ed.windowManager.open({
							file : url + '/interface.php',
							width : 410,
							height : 250,
							inline : 1
						}, {
							plugin_url : url
						});
					}
				});
			},
			createControl : function(n, cm) {
				return null;
			},
		});
		tinymce.PluginManager.add('shortcodes', tinymce.plugins.shortcodes);
	})();
}

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

function correctButton(){
	//alert('isse');
	document.getElementById('content_shortcodes').style.width = "72px";
	document.getElementById('content_shortcodes').firstChild.style.width = "72px";
}

window.onload = correctButton;